package main;

import panel.TabPanel;
import database.DataEngine;
import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author daz
 */
public class Main {

    public static void main(String[] args) {
        try {
            // Set cross-platform Java L&F (also called "Metal")
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
        } catch (UnsupportedLookAndFeelException e) {
            // handle exception
        } catch (ClassNotFoundException e) {
            // handle exception
        } catch (InstantiationException e) {
            // handle exception
        } catch (IllegalAccessException e) {
            // handle exception
        }
        DataEngine dataEngine = DataEngine.getInstance();
        dataEngine.setConfig("210.211.127.164", 3306, "gamepoker", "GaMe2o12", "poker_online", "poker_online");
//        dataEngine.setConfig("localhost", 3306, "gamepoker", "0901hc", "poker_online", "poker_online");
        dataEngine.connectToDabatabase();
        UIManager.put("swing.boldMetal", Boolean.TRUE);
        JFrame frame = new JFrame("Tool subcripser");
        JFrame.setDefaultLookAndFeelDecorated(true);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        TabPanel tabPanel = new TabPanel(frame);
        tabPanel.addComponentToPane(frame.getContentPane());
        frame.pack();
        frame.setVisible(true);
    }
}
